1. Field of the Invention
The present invention relates to a time-division type matrix calculator, and more particularly, to a matrix calculator for multiplying two matrices by sequentially selecting elements of the matrices and performing multiplication and addition of the selected elements. The present invention is based on Korean Patent Application No. 2001-5334 filed on Feb. 5, 2001, which is incorporated herein by reference.
2. Description of the Related Art
Generally, in a field such as image signal processing, multiplication of matrices is often required. In order to perform the multiplication of the matrices, a matrix calculator uses a plurality of multipliers and a plurality of adders to obtain a mathematical expression of a result of a multiplication operation.
FIG. 1 is a block diagram of a conventional matrix calculator, especially showing a matrix calculator that performs multiplication with two 3×3 square matrices. FIG. 2 shows detailed construction of each block of FIG. 1.
When the first matrix is X matrix, and the second matrix is Y matrix, the X matrix is,       [                            X1                          X2                          X3                                      X4                          X5                          X6                                      X7                          X8                          X9                      ]    ,and Y matrix is,       [                            Y1                          Y2                          Y3                                      Y4                          Y5                          Y6                                      Y7                          Y8                          Y9                      ]    .Also, a product of X and Y matrices is,       [                            Z1                          Z2                          Z3                                      Z4                          Z5                          Z6                                      Z7                          Z8                          Z9                      ]    =                                   [                                                    X1                                            X2                                            X3                                                                    X4                                            X5                                            X6                                                                    X7                                            X8                                            X9                                              ]                ⁢                                   [                                   ⁢                                            Y1                                      Y2                                      Y3                                                          Y4                                      Y5                                      Y6                                                          Y7                                      Y8                                      Y9                                      ]            =              [                                   ⁢                                                            X1Y1                +                X2Y4                +                X3Y7                                                                    X1Y2                +                X2Y5                +                X3Y8                                                                    X1Y3                +                X2Y6                +                X3Y9                                                                                        X4Y1                +                X5Y4                +                X6Y7                                                                    X4Y2                +                X5Y5                +                X6Y9                                                                    X4Y3                +                X5Y6                +                X6Y9                                                                                        X7Y1                +                X8Y4                +                X9Y7                                                                    X7Y2                +                X8Y5                +                X9Y8                                                                    X7Y3                +                X8Y6                +                X9Y9                                                    ]            
As shown in FIG. 1, the conventional matrix calculator for processing the operation as described above includes three blocks 10, 20, and 30. The first block 10 is input with X1, X2, X3, the second block 20 is input with X4, X5, X6, and the third block 30 is input with X7, X8, X9. Further, each of the blocks 10, 20, 30 is input with Y1 through Y9.
As shown in FIG. 2, the first block 10 includes nine (9) multipliers 11 input with Y1 through Y9, respectively, nine (9) D flip-flops 13 (three (3) groups of three (3) D flip-flops—an upper three flip-flops, an intermediate three flip-flops, and a lower three flip-flops) for storing output from the multipliers 11, and three (3) adders 15 input with outputs from three of the nine (9) D flip-flops 13, respectively. The upper three multipliers 11 are input with X1, the intermediate three multipliers 11 are input with X2, and the lower three multipliers 11 are input with X3. Outputs from the respective multipliers 11 are stored in the D flip-flops 13 and then input into the adders 15. The adders 15 add input values and output the results Z1, Z2, Z3, respectively.
Constructions of the second and the third blocks 20 and 30 are identical to the construction of the first block 10 shown in FIG. 2. That is, the second block 20 outputs Z4, Z5, Z6, and the third block 30 outputs Z7, Z8, Z9.
The conventional matrix calculator, however, has a disadvantage in that the circuit becomes bulky since it requires a plurality of multipliers 11 and adders 15. That is, a total of twenty-seven (27) multipliers 11 are required for the block 10, 20, 30, while eighteen (18) adders 15 are required for the blocks 10, 20, 30 (since the adder 15 adds three inputs, each adder 15 actually consists of two adders, each of which adds two inputs).